﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:De.LarsHildebrandt.WpfControls.WpfSimpleChart">

    <LinearGradientBrush x:Key="LightBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#FFF" Offset="0.0"/>
                <GradientStop Color="#EEE" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />

    <Style x:Key="toolTipStyle" TargetType="ToolTip">
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="HasDropShadow" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Border Name="Border"
                        CornerRadius="4"
                        Background="{StaticResource LightBrush}"
                        BorderBrush="{StaticResource SolidBorderBrush}"
                        BorderThickness="1"
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}">
                        <StackPanel Orientation="Horizontal" >
                            <Label Content="{Binding Path=Caption}"></Label>
                            <Label>:</Label>
                            <Label Content="{Binding Path=Value}"></Label>
                        </StackPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasDropShadow" Value="true">
                            <Setter TargetName="Border" Property="CornerRadius" Value="4"/>
                            <Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>